<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>


<jsp:include flush="true" page="../header.jsp"></jsp:include>
<div class="contentwrap z">
<div class="t">cddvd</div>

	<div class="t">
		<table cellspacing="0" cellpadding="0" width="100%">
			<tr>
				<th class="h" colspan="7">
					<a class="closeicon fr" style="cursor: pointer;"
						onclick=returnIndexDeploy('85', 0);><img id="img_85"
							src="images/yellow/index/cate_fold.gif" /> </a>
					<h2>
						&raquo;
							<s:url action="list_board" id="url">
								<s:param name="result">hotThread</s:param>
							</s:url>
						
						<a href="${url}" class="cfont">热门帖</a>
					</h2>
				</th>
			</tr>
			<tr class="tr2">
				<td width="*" colspan="2" class="tac">
					帖子
				</td>
				<td class="tal y-style e" style="width: 15%">
					论坛
				</td>
				<td class="tal y-style e" style="width: 15%">
					回帖
				</td>
				<td class="tal y-style f" style="width: 10%">
					版主
				</td>
				<td class="y-style" style="width: 15%">
					人气
				</td>
			</tr>
			<c:forEach var="thread" items="${ hotList }">
				<tr class="tr3 f_one">
					<td class="icon tac" width="45">
						<s:url action="list_thread" id="url">
							<s:param name="thread.id">${thread.id }</s:param>
						</s:url>
						<a href="${url}"><img src="images/yellow/new.gif" /> </a>
					</td>
					<td>
						<s:url action="list_thread" id="url">
							<s:param name="thread.id">${thread.id }</s:param>
						</s:url>
						<a href="${url}" class="cfont">${ thread.title }</a>
					</td>
					<td class="tal y-style e"> 
					${ thread.board.name}
					</td>
                  <td class="tal y-style e"> 
					${ thread.replyCount}
					</td>
					<td class="y-style"
						style="word-break: keep-all; word-wrap: no-wrap">
							<s:url action="view_person" id="url" namespace="/system">
								<s:param name="person.id">${ thread.author.id }</s:param>
							</s:url>
							<a href="${url}">${ thread.author.name}</a>
						&nbsp;
					</td>
					 <td class="tal y-style e"> 
					${ thread.hit}
					</td>
				</tr>
			</c:forEach>
		</table>
	</div>


	<c:forEach var="category" items="${ cateList }">
		<div class="t">
			<table cellspacing="0" cellpadding="0" width="100%">
				<tr>
					<th class="h" colspan="7">
						<a class="closeicon fr" style="cursor: pointer;"
							onclick=returnIndexDeploy('85', 0);><img id="img_85"
								src="images/yellow/index/cate_fold.gif" /> </a>
						<h2>
							&raquo;
							<s:url action="list_category" id="url">
								<s:param name="category.id">${ category.id }</s:param>
							</s:url>
							<a href="${url}" class="cfont">${ category.name }</a>
						</h2>
					</th>
				</tr>
				<tr class="tr2">
					<td width="*" colspan="2" class="tac">
						论坛
					</td>
					<td class="tal y-style e" style="width: 5%">
						帖子
					</td>
					<td class="tal y-style e" style="width: 5%">
						回帖
					</td>
					<td class="tal y-style f" style="width: 40%">
						最后发表
					</td>
					<td class="y-style" style="width: 10%">
						版主
					</td>
					<s:if test="#session.personInfo.group=='admin'">
						<td>
							修改/删除
						</td>
					</s:if>
				</tr>
				<tbody id="cate_85" style="display: ;">
					<c:forEach var="board" items="${ category.boards }">
						<c:if test="${!board.deleted}">
							<c:if test="${board.name!=null}">
								<tr class="tr3 f_one">
									<td class="icon tac" width="45">
										<s:url action="list_board" id="url">
											<s:param name="board.id">${ board.id }</s:param>
										</s:url>
										<a href="${url}"><img src="images/yellow/new.gif" /> </a>
									</td>
									<th>
										<h3 class="b">
											<s:url action="list_board" id="url">
												<s:param name="board.id">${ board.id }</s:param>
											</s:url>
											<a href="${url}">${ board.name }</a>
										</h3>
										<br />
										<span class="smalltxt gray">${ board.description }</span>
									</th>
									<td class="tal y-style e">
										<span class="f10">${ board.threadCount }</span>
										<br />
									</td>
									<td class="tal y-style e">
										<span class="f10">${ board.replyCount }</span>
										<br />
									</td>
									<th>
										<c:if test="${ board.lastThread != null }">
											<s:url action="list_thread" id="url">
												<s:param name="thread.id">${ board.lastThread.id }</s:param>
											</s:url>
											<a href="${url}" class="a2">${ board.lastThread.title }</a>
											<br />
											<span class="f12"> <s:url action="view_person"
													id="url" namespace="/system">
													<s:param name="person.id">${ board.lastReply.author.id }</s:param>
												</s:url><a href="%{url}">${ board.lastThread.author.name }</a> </span>
											<span class="f9 gray"> <fmt:formatDate
													value="${board.lastThread.dateCreated }"
													pattern="yyyy-MM-dd HH:mm:ss" /> </span>
										</c:if>
										<c:if test="${ board.lastReply != null }">
											<s:url action="list_thread" id="url">
												<s:param name="thread.id">${ board.lastReply.thread.id }</s:param>
												<s:param name="reply.id">${ board.lastReply.id }</s:param>
											</s:url>
											<a href="${url}" class="a2">${ board.lastReply.title }</a>
											<br />
											<span class="f12"> <s:url action="view_person"
													id="url" namespace="/system">
													<s:param name="person.id">${ board.lastReply.author.id }</s:param>
												</s:url><a href="${url}">${ board.lastReply.author.name }</a> </span>
											<span class="f9 gray"> <fmt:formatDate
													value="${board.lastReply.dateCreated }"
													pattern="yyyy-MM-dd HH:mm:ss" /> </span>
										</c:if>
										&nbsp;
									</th>
									<td class="y-style"
										style="word-break: keep-all; word-wrap: no-wrap">
										<c:forEach var="person" items="${ board.administrators }">
											<s:url action="view_person" id="url" namespace="/system">
												<s:param name="person.id">${ person.id }</s:param>
											</s:url>
											<a href="${url}">${ person.name }</a>
										</c:forEach>
										&nbsp;
									</td>
									<s:if test="#session.personInfo.group=='admin'">
										<td>

											<s:url action="load_board" id="url">
												<s:param name="board.id">${ board.id }</s:param>
											</s:url>
											<a href="${url}">修改</a>|
											<s:url action="delete_board" id="url">
												<s:param name="board.id">${ board.id }</s:param>
											</s:url>
											<a href="${url}">删除</a>
										</td>
									</s:if>
								</tr>
							</c:if>
						</c:if>
					</c:forEach>
					<tr>
						<td class="f_one" colspan="7" style="height: 8px" align="center">
							<s:if test="#session.personInfo.group=='admin'">
								<s:a href="../jingyanku/category/addCategory.jsp">添加论坛类型</s:a>
								<s:url action="delete_category" id="url">
									<s:param name="category.id">${ category.id }</s:param>
								</s:url>
								<s:a href="%{url}">删除论坛类型</s:a>
								<s:url action="initAdd_board" id="url"></s:url>
								<s:a href="%{url}">添加版面</s:a>
							</s:if>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	</c:forEach>
</div>

<jsp:include flush="true" page="../footer.jsp"></jsp:include>







